<table>
	<?php foreach ($data as $key => $row) {
		if ($key == 0) {
			$fields = array_keys($row);
			?>
			<tr>
				<?php foreach($fields as $field) { ?>
				<th><?php echo $field; ?></th>
				<?php } ?>
			</tr>
			<?php
		}
		?>
		<tr>
			<?php foreach($row as $value) { ?>
			<th><?php echo iconv('GBK', 'UTF-8', $value); ?></th>
			<?php } ?>
		</tr>
		<?php
	}
	?>
</table>